package com.ruoyi.passenger.evaluationcomplaints.controller;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.model.LoginUser;
import com.ruoyi.management.complaint.service.ITOrderEvaluateService;
import com.ruoyi.passenger.evaluationcomplaints.ro.GetEvaluationParam;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
 * 乘客端 评价投诉Controller
 *
 * @author ruoyi
 * @date 2021-12-01
 */
@Api(hidden = true)
@Validated
@RestController
public class EvaluationComplaintsController extends BaseController {
    @Autowired
    private ITOrderEvaluateService tOrderEvaluateService;

    /**
     * 新增乘客评价
     */
    @ApiOperation("新增乘客评价")
    @GetMapping("/ckpj")
    public AjaxResult add(@Valid GetEvaluationParam param) {
        LoginUser loginUser = getLoginUser();
        //获取登录人信息
        return tOrderEvaluateService.insertTOrderEvaluate(param, loginUser);
    }
}
